package util;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class ServerUtil {

    public static String getContentFile(String fileName) {
        //File file = new File(fileName);
        StringBuilder sb = new StringBuilder();
        try {
            FileReader in = new FileReader(fileName);
            BufferedReader reader = new BufferedReader(in);

            while (reader.ready()) {
                sb.append(reader.readLine());
                sb.append("\n");
            }

            reader.close();
            in.close();

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

        return sb.toString();
    }

}
